package com.company.Thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;

/**
 * @ProjectName: 复习java
 * @Package: com.company.Thread
 * @ClassName: ThreadTest
 * @Author: wym
 * @Date: 2020/8/5 20:07
 * @Version: 1.0
 */
public class ThreadTest {
    public static void main(String[] args) {
        //创建线程池
        ExecutorService executorService = Executors.newCachedThreadPool();
        Semaphore sem=new Semaphore(3);
        for (int i = 0; i < 10; i++) {
            executorService.execute(()->{

            });
        }
    }
}
